//
//  DKAuthHomeNullProductView.m
//  DanKU
//
//  Created by 蓝鳍互娱 on 2023/12/6.
//

#import "DKAuthHomeNullProductView.h"

@implementation DKAuthHomeNullProductView
-(instancetype)init{
    if(self == [super init]){
        self.backgroundColor = UIColor.clearColor;
        [self creatSubView];
    }
    return self;
}
- (void)creatSubView{
    UIView *dk_AuthHomeProductView = [[UIView alloc] init];
    dk_AuthHomeProductView.backgroundColor = UIColor.whiteColor;
    dk_AuthHomeProductView.layer.cornerRadius = DK_IsWidthScale(20);
    dk_AuthHomeProductView.clipsToBounds = YES;
    [self addSubview:dk_AuthHomeProductView];
    [dk_AuthHomeProductView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(@(DK_IsWidthScale(15)));
        make.right.equalTo(@(-DK_IsWidthScale(15)));
        make.top.equalTo(@(DK_IsWidthScale(0)));
        make.height.equalTo(@(DK_IsWidthScale(129)));
    }];
    UIImageView * dk_AuthHomeProductNullImageView = [[UIImageView alloc] init];
    dk_AuthHomeProductNullImageView.userInteractionEnabled = YES;
    dk_AuthHomeProductNullImageView.image = DK_GetImage(@"dk_HomeAuthorizeNullIcon");
    [dk_AuthHomeProductView addSubview:dk_AuthHomeProductNullImageView];
    [dk_AuthHomeProductNullImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(dk_AuthHomeProductView);
        make.top.equalTo(@(DK_IsWidthScale(15)));
        make.height.equalTo(@(DK_IsWidthScale(56)));
        make.width.equalTo(@(DK_IsWidthScale(90)));
    }];
    UILabel * dk_AuthHomeProductAlertLab = [[UILabel alloc] init];
    dk_AuthHomeProductAlertLab.textColor = DK_Hex(@"#CCCCCC");
    dk_AuthHomeProductAlertLab.font = DK_FONT_Regular(13);
    dk_AuthHomeProductAlertLab.text = @"Sorry, no products have been matched for you at the moment";
    dk_AuthHomeProductAlertLab.numberOfLines = 0;
    dk_AuthHomeProductAlertLab.textAlignment = NSTextAlignmentCenter;
    [dk_AuthHomeProductView addSubview:dk_AuthHomeProductAlertLab];
    [dk_AuthHomeProductAlertLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(dk_AuthHomeProductView);
        make.top.equalTo(dk_AuthHomeProductNullImageView.mas_bottom).offset(DK_IsWidthScale(7));
        make.left.equalTo(@(DK_IsWidthScale(55)));
        make.right.equalTo(@(-DK_IsWidthScale(55)));
    }];
}
@end
